package wiki.hitime.stl.daq.bean.dto.manage;


import wiki.hitime.stl.daq.web.controller.admin.RuleManageController;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.RequiredArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author zhangdp
 * @since 2019-07-15 16:59:58
 */
@Data
@Builder
@AllArgsConstructor
@RequiredArgsConstructor
public class AcquisitionRuleDTO {

    /**
     * 规则编号
     */
    private Long id;

    /**
     * 执行规则编号
     **/
    private Long executeRuleId;

    /**
     * 采集规则名称
     **/
    @NotEmpty(message = "采集规则名称为空", groups = RuleManageController.class)
    private String ruleName;

    /**
     * 采集规则表达式
     **/
    @NotEmpty(message = "采集规则表达式为空", groups = RuleManageController.class)
    private String acquisitionExpression;

    /**
     * 数据源配置编号
     **/
    @NotNull(message = "数据源配置编号为空", groups = RuleManageController.class)
    private Long dbConfigId;

    /**
     * 采集类型，1-单一值采集，2-单列值采集
     **/
    @NotNull(message = "采集类型为空", groups = RuleManageController.class)
    private Integer acquisitionType;

    /**
     * 值类型，1-数字，2-日期时间，3-布尔，4-文本
     */
    @NotNull(message = "值类型为空", groups = RuleManageController.class)
    private Integer valueType;

    /**
     * 值转换表达式
     */
    private String valueFormat;

    /**
     * 备注
     **/
    private String remark;
}
